home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / EmacsTeX / Emacs-3.0.1 / Source / EtermView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  3.0 KB  |  115 lines

  1. /* The EtermView interface.
  2.  
  3.    For legal stuff see the file COPYRIGHT.  */
  4.  
  5. #import <stdio.h>
  6. #import <appkit/appkit.h>
  7.  
  8. #define BORDER_WIDTH 2
  9.  
  10. @interface EtermView : View
  11. {
  12.   void *rock;            /* Display rock for this view.           */
  13.   float spacing;        /* Font spacing.  */
  14.   Font *displayFont;        /* Font to display with.  */
  15.   BOOL emacsOn;            /* YES if emacs has been started */
  16.   int fontHeight, fontWidth, fontDescender; /* Font characteristics */
  17.   int lines, cols;        /* Size of view in characters */
  18.   int masterChannel;        /* FD of /dev/pty device */
  19.   int eventServerSocket;    /* FD listening for event connection */
  20.   FILE *eventChannel;        /* file ptr of event socket */
  21.   /* Our openPanel.  */
  22.   OpenPanel *openPanel;
  23.   /* Our savePanel.  */
  24.   SavePanel *savePanel;
  25.   /* First part of window title.  */
  26.   char *titleprefix;
  27.   Pasteboard *currentPasteboard;
  28.   Pasteboard *mainPasteboard;
  29.   BOOL pasteboardWaiting;    /* Has the requested data been pasted yet? */
  30.  
  31.   /* Files to start the Emacs up with, and lines to point at.           */
  32.   char    **startFiles;
  33.   int    *startLines;
  34.   int    startNum;
  35.  
  36.   /* Additions for live mouse dragging. */
  37.   int    oldx, oldy, oldmask;
  38. }
  39.  
  40. +initialize;
  41. -initFrame: (const NXRect *) newFrame;
  42. -(float) spacing;
  43. -setSpacing: (float) newSpacing;
  44. -font;
  45. -setFont: newFont;
  46. -changeFont: sender;
  47.  
  48. -(FILE *) eventChannel;
  49. -setEventChannel: (FILE *) fp;
  50. -windowWillResize: sender toSize: (NXSize *) frameSize;
  51. -windowDidResize: sender;
  52. -startEmacs;
  53. -quitEmacs;
  54. -(BOOL) emacsOn;
  55. -(BOOL) newFile: (const char *) path;
  56. -(BOOL) acceptsFirstResponder;
  57. -keyDown: (NXEvent *) theEvent;
  58. -mouseDown: (NXEvent *) theEvent;
  59. -mouseUp: (NXEvent *) theEvent;
  60. -mouseDragged: (NXEvent *) theEvent;
  61. -rightMouseDown: (NXEvent *) theEvent;
  62. -rightMouseUp: (NXEvent *) theEvent;
  63.  
  64. /* Return the current pasteboard.  */
  65. -pasteboard;
  66. -appPasteboard;
  67. -setPasteboard: pboard;
  68. -(BOOL) sendEmacsEvent: (char *) theEvent;
  69. -pasteboardWritten;
  70. -(BOOL)pasteboardWaiting;
  71.  
  72. /* Action methods.  */
  73. -undo: sender;
  74. -save: sender;
  75. -saveAll: sender;
  76. -cut: sender;
  77. -copy: sender;
  78. -paste: sender;
  79. -open: sender;
  80. -saveAs: sender;
  81.  
  82. /* Low level cut, copy and paste.  Return YES on success and NO on failure.  */
  83. -(BOOL) cutTo: pasteboard;
  84. -(BOOL) copyTo: pasteboard;
  85. -(BOOL) pasteFrom: pasteboard;
  86.  
  87. -getDimensions: (int *) linesPtr : (int *) colsPtr;
  88. -(Font *) getDisplayFont:
  89.   (int *) heightPtr :
  90.   (int *) widthPtr :
  91.   (int *) descenderPtr;
  92.  
  93. -showTitle: (int) lines : (int) columns;
  94. -setTitle: (char *) title;
  95.  
  96. /* Functions for handeling services.  */
  97. -validRequestorForSendType: (NXAtom) typeSent
  98.  andReturnType: (NXAtom) typeReturned;
  99. -(BOOL) writeSelectionToPasteboard: pboard types: (NXAtom *) types;
  100. -readSelectionFromPasteboard: pboard;
  101.  
  102. /* Functions for accepting remote messages. */
  103. -(int)openFile : (char *) fileName
  104.     onHost : (char *) hostName
  105.     atTrueLine : (int) line;
  106. -(int)openFile : (char *) fileName
  107.     onHost : (char *) hostName
  108.     fromTrueLine : (int) line
  109.     to : (int) line;
  110.  
  111.   /* Function for adding a file to the open queue.               */
  112. - (BOOL)addFile:(const char *)path atLine:(int)line;
  113.  
  114. @end
  115.